package com.erli.exchange.dao.entity;


import lombok.Getter;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;
import javax.persistence.Table;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import tk.mybatis.mapper.annotation.KeySql;
import java.time.LocalDateTime;


/**
 * @desc TODO
 * @title UserEntity.java
 * @package com.erli.exchange.dao.entity
 * @author lihu
 * @update 2019-03-17 23:01:10
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Table(name = "user")
public class UserEntity  {

	//主键id
	@Id
	@KeySql(useGeneratedKeys = true)
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;
	
	//用户手机号
	@Column(name = "mobile")
	private String mobile;
	
	//用户密码
	@Column(name = "password")
	private String password;
	
	//用户昵称
	@Column(name = "nick_name")
	private String nickName;
	
	//邮箱地址
	@Column(name = "email")
	private String email;
	
	//创建时间
	@Column(name = "create_time")
	private LocalDateTime createTime;
	
	//实体类常用属性名枚举，需要请自行添加
 	@Getter
 	public enum ParamsEnum{
  		ID("id"),
  		MOBILE("mobile");
  		private String name;
  		ParamsEnum(String name) {
   			this.name = name;
  		}
 	}
}
